﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Auctiondetails : System.Web.UI.UserControl
{
    BusinessLogic obj_business = new BusinessLogic();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int userid =Convert.ToInt32(Session["userid"].ToString());
            DataTable auction_details = obj_business.getauctiondetails(userid);
            gvMyauctions.DataSource = auction_details;
            gvMyauctions.DataBind();
        }

    }
    public string getSRC(object imgSRC)
    {
        DataRowView dRView = (DataRowView)imgSRC;
        string ImageName = dRView["Itemimage"].ToString();
        if (ImageName == "NoImage")
        {
            return ResolveUrl(@"~/itemimages/missing.jpg");
        }
        else
        {
            return ResolveUrl(ImageName);
        }
    }

    public string itemtype(object sURL)
    {
        DataRowView dRView = (DataRowView)sURL;
        string heading = dRView["itemname"].ToString();
        return heading;
    }
}